#include "Rayon.hpp"

#include "Algebre/Coord.hpp"

#include "Formes/Tore.hpp"

#include <iostream>

using namespace std;

int main(int argc, char* argv[])
{
  Tore tore( Coord( 0., 0., 3. ), VecteurU( 0., 0., 1. ), 3., 1. );

  Coord A(5., 0., 3.03);
  VecteurU v(-1., 0., 0.);
  
  cout << "Point " << tore.point() << ", axe " << tore.axe()
       << ", grand rayon " << tore.grand() << ", petit rayon "
       << tore.petit() << endl;

  Coord inter( tore.trouveIntersection( Rayon( A, VecteurU( -1., 0., 0. ) ) ) );

  cout << "Intersection : " << inter << ", normale : " << tore.normale( inter )
       << endl;
  cout << "*****************************************************************************" << endl;

  inter = tore.trouveIntersection( Rayon( Coord( 3., 0., 3.5 ), Coord( 0., 0., -1. ) ) );
  cout << "Intersection : " << inter << ", normale : " << tore.normale( inter )
       << endl;
  cout << "*****************************************************************************" << endl;

  return 0;
}
